package nccloud.web.hihr.ext.action;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONArray;

import nc.itf.hrhi.bill.IXcHrExtBillService;
import nc.itf.hrhi.util.JsonUtil;
import nc.vo.pub.BusinessException;
import nccloud.framework.core.exception.ExceptionUtils;
import nccloud.framework.service.ServiceLocator;
import nccloud.framework.web.action.itf.ICommonAction;
import nccloud.framework.web.container.IRequest;

public class GetNewTreeDataAction implements ICommonAction{

	@Override
	public Object doAction(IRequest request) {
		
		String content = request.read();
		JSONArray arr = JSONArray.parseArray(content);
		List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
		
	    try {
	    	result = ServiceLocator.find(IXcHrExtBillService.class).queryNewTreeData(JsonUtil.jsonArr2strArr(arr));
		} catch (BusinessException e) {
			ExceptionUtils.wrapException(e);
		}
		
		return result;
	}

}
